﻿define(function (require, exports, module) {
    "require:nomunge,exports:nomunge,module:nomunge";
    var $ = require("jquery");
    
    var $page = $("#page");

    $page.find(".nav_item").hover(function () {
        var $this = $(this);
        $this.find(".nav_sub").slideDown(200);
        $this.find(".nav_item_sub").addClass("bt_line");
    }, function () {
        var $this = $(this);
        $this.find(".nav_sub").slideUp(200);
        $this.find(".nav_item_sub").removeClass("bt_line");
    });

    var _autoHeight = function () {
        var _topHeight = $page.find(".header").outerHeight(),
            _footHeight = $page.find(".recruit_footer").outerHeight(),
            _winHeight = $(document).height(),
            _realHeight = _winHeight - _topHeight
        ;
        if ($page.find(".offers_header")) {
            _realHeight = _winHeight - _topHeight - _footHeight;
        };
        $page.find(".auto_height").height(_realHeight);
    };
    _autoHeight();
    $(window).resize(function () {
        _autoHeight();
    });

});
